package com.example.data.factory.entity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 数据库信息
 * </p>
 *
 * @author lhy
 * @since 2025-03-03
 */
@Getter
@Setter
@TableName("database_info")
@ApiModel(value = "DatabaseInfo对象", description = "数据库信息")
public class DatabaseInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("数据库id，唯一标识，递增")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("数据库类型，默认Mysql")
    private String type;

    @ApiModelProperty("数据库名称")
    private String name;

    @ApiModelProperty("数据库描述")
    private String description;

    @ApiModelProperty("数据库地址，与数据库名称唯一")
    private String url;

    @ApiModelProperty("数据库用户名")
    private String username;

    @ApiModelProperty("数据库密码")
    private String password;

    @ApiModelProperty("0-未发布（草稿），1-已发布，2-已停用")
    private Byte status;

    @ApiModelProperty("删除状态 0：未删除， 1：已删除")
    private Byte deleted;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
}
